<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<include file='Common:head'/>
<link rel="stylesheet" type="text/css" href="__ROOT__/Public/Admin/css/style.css">
<!--编辑器-->
<script type="text/javascript" src="__ROOT__/Public/Admin/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__ROOT__/Public/Admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__ROOT__/Public/Admin/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
  $(document).ready(function(e) {
    $('#sel li').click(function(){
      $(".tab-front").removeClass("tab-front").addClass("tab-back");
      $('#sel li a').removeClass(); 
      $(this).find('a').attr('class','selected');
      $(this).removeClass("tab-back").addClass("tab-front");
      var i = $(this).index();
      $(".tabbody-div").hide();
      $(".tabbody-div").eq(i).show();
    });
  });

</script>
<body>
<form action="{:U('Article/addDo')}" method="post" enctype="multipart/form-data">
  <div class="formbody">
    <div class="formtitle">
      <div class="itab">
        <ul id='sel'>
          <li class="tab-front"><a class="selected" style="cursor:pointer;">基本信息</a></li>
          <li class="tab-back"><a class="" style="cursor:pointer;">SEO信息</a></li>
          <li class="tab-back"><a class="" style="cursor:pointer;">附属信息</a></li>
        </ul>
      </div>
    </div>
    <ul class="forminfo">
      <div class="tabbody-div">
        <li>
          <label>文章标题</label>
          <input name="name" type="text" class="dfinput" />
          <i>标题不能超过300个字符</i></li>
        <li>
          <label>分类选项</label>
          <select id='cid' name="cid"style="width:347px; height:34px; border:1px solid #CED9DF; line-height:34px;">
            <option value="0">请选择一个分类</option>
            	<foreach name="cate" item="v">
                    <option value="{$v['id']}">
                    	<if condition="$v['pid'] neq 0">{$v['html']}</if>{$v['name']}
                    </option>
                </foreach>
          </select>
          <i>请选择一个分类</i> </li>
        
        <li>
        <label></label>
            <div style="margin-left:85px;" id="selectCid">
            	<!--
                <foreach name='cattr' item='v'>
                    <div style="margin-bottom:5px;">
                        <a>{$v['name']}:&nbsp;</a>
                            <foreach name="v['child']" item='vo'>
                                <input name="aid[]" type="checkbox" value="{$vo['id']}" />
                                &nbsp;{$vo['name']}&nbsp;&nbsp;&nbsp;&nbsp;
                            </foreach>
                        <br/>            
                    </div>
                </foreach>
                -->
            </div>
        </li> 
       
        <if condition=" $attr neq '' "> 
        <li>
        	<label>标签选项</label>
            <div style="margin-left:85px; margin:20px auto; " id="selectCid">
                <foreach name='attr' item='v'>
                	<span style="width:120px; height:20px; line-height:20px; text-align:left; float:left;">
                    <input name="tag_id[]" type="checkbox" value="{$v['id']}" style=" margin-top:5px;"/>
                    &nbsp;<a style="color:{$v['color']};">{$v['name']}</a>  
                    </span>
                	     
                </foreach>               
            </div>
        </li> 
        </if>
         
        <li>
          <label>文章内容</label>
          <textarea id="content" cols="" rows="" name="content" style="margin-left:85px;"></textarea>
          <script type="text/javascript">
       		//把textarea替换成一个编辑器
        	UE.getEditor('content',{
                initialFrameWidth:700,
                initialFrameHeight:300,
            });
          </script> 
        </li>
      </div>
      <div class="tabbody-div" style="display:none;">
        <li>
          <label>SEO标题</label>
          <input name="title" type="text" class="dfinput" />
          <i>seo标题不能超过300个字符</i></li>
        <li>
          <label>SEO关键字</label>
          <input name="keywords" type="text" class="dfinput" />
          <i>多个关键字用 ， 隔开 ， 不能超过400个字符</i></li>
        <li>
          <label>SEO描述</label>
          <textarea name="description" cols="" rows="" class="textinput"></textarea>
          <i>描述不能超过500个字符</i></li>
      </div>
      <div class="tabbody-div" style="display:none;"> 
        <li>
          <label>缩略图</label>
          <input type="file" name="pic" value="上传图片"/>
          <i>上传的图片请不要大于 1MB</i>
        </li>
        <li>
          <label>文章属性</label>
          <i> <cite>
          <div style="float:left; margin-right:1px;">
            <input name="xing" type="radio" value="0" checked="checked"/>
            &nbsp;
            无需属性 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="1" />
            &nbsp; <img src="__ROOT__/Public/Admin/xing/x1.gif">【推荐】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="2" />
            &nbsp; <img src="__ROOT__/Public/Admin/xing/x2.gif">【最新】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="3" />
            &nbsp; <img src="__ROOT__/Public/Admin/xing/x3.gif">【置顶】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="4" />
            &nbsp; <img src="__ROOT__/Public/Admin/xing/x4.gif">【头条】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="5" />
            &nbsp; <img src="__ROOT__/Public/Admin/xing/x5.gif">【前排】 </div>
          </cite> </i> </li>
          
        <li>
          <label>审核选项</label>
          <cite>
          <input name="lock" type="radio" value="1" checked="checked"/>
          无需审核 &nbsp;&nbsp;&nbsp;&nbsp;
          <input name="lock" type="radio" value="0" />
          需要审核 &nbsp;&nbsp;&nbsp;&nbsp;    
          </cite> </li>
        <li>
          <label>评论选项</label>
          <cite>
          <input name="comment" type="radio" value="1" checked="checked"/>
          允许评论 &nbsp;&nbsp;&nbsp;&nbsp;
          <input name="comment" type="radio" value="0" />
          禁止评论 &nbsp;&nbsp;&nbsp;&nbsp;    
          </cite> </li>          
        <li>
          <label>浏览量</label>
          <input type="text" name="num" value="" class="dfinput">
          <i>浏览量不能超过6位的整数</i> </li>
        <li>
          <label>作者</label>
          <input type="text" name="doc" value="<?php echo $_SESSION['session_username']?>" class="dfinput">
          <i>作者不能超过50个字符</i> </li>
        <li>
          <label>文章来源</label>
          <input type="text" name="url" value="" class="dfinput">
          <i>请加上 http:// 协议！不能超过50个字符</i> </li>
        <li>
          <label>文章摘要</label>
          <textarea id="remark" cols="" rows="" name ="remark" style="margin-left:85px;"></textarea>
          <script type="text/javascript">
			//把textarea替换成一个编辑器
			UE.getEditor('remark',{
					initialFrameWidth:750,
					initialFrameHeight:100,
				});
			</script> 
        </li>
      </div>

      <li>
        <label>&nbsp;</label>
        <input name="time" type="hidden" value=<?php echo time();?>>
        <input name="" type="submit" class="btn" value="确认保存"/>
      </li>
    </ul>
  </div>
</form>
</body>
</html>
